<template>
    <div id="templateShow">
      <homeHeader></homeHeader>
      <div id="bottom">
        <menuNav></menuNav>
        <main style="width: 100%;">
          <div class="detail">
            <div class="content">
              
                <el-button class="fan"  @click="out">返回</el-button>
              
             
              <h4>店铺信息</h4>
              <div>
                <p>店铺ID：{{detailData.mchId}}</p>
                <p>店铺名称：{{detailData.shopName}}</p>
                <p>店铺账号：{{detailData.mchAccount}}</p>
              </div>
              <h4>订单信息</h4>
              <section>
                <section>
                  <p>申请时间：{{detailData.withdrawTime}}</p>
                  <p>订单号：{{detailData.outTradeNo}}</p>
                  <p>支付流水号：{{detailData.transferTradeNo}}</p>
                  <p>申请提现金额：{{detailData.withdrawApplyMoney}}</p>
                </section>
                <section>
                  <p>实现到账金额：{{detailData.withdrarMoney}}</p>
                  <p>提现方式：{{detailData.withdrawType==0?"银行卡":"支付宝"}}</p>
                  <p v-show="detailData.withdrawStatus==0">状态：提现中</p>
                  <p v-show="detailData.withdrawStatus==1">状态：提现成功</p>
                  <p v-show="detailData.withdrawStatus==2">状态：提现失败</p>
                  <p v-show="detailData.withdrawRemark">提现原因：{{detailData.withdrawRemark}}</p>
                  <p v-show="detailData.auditRemark">拒绝原因：{{detailData.auditRemark}}</p>
                </section>
              </section>
              <h4>付款方信息</h4>
              <div>
                <p>付款账户：{{detailData.appId}}</p>
              </div>
              <h4>收款方</h4>
              <div>
                <p v-show="detailData.withdrawType==0">收款户名：{{detailData.bankBranckName}}</p>
                <p v-show="detailData.withdrawType==1">收款户名：{{detailData.alipayName}}</p>
                <p>收款账户类型：{{detailData.withdrawType==0?"银行卡":"支付宝"}}</p>
                <p v-show="detailData.withdrawType==0">收款账号：{{detailData.bankAccount}}</p>
                <p v-show="detailData.withdrawType==1">收款账号：{{detailData.alipayAccount}}</p>
              </div>
              <main class="btn" v-show="detailData.withdrawStatus==2">
                <el-button type="primary" style="margin-left: 600px;" @click="consentBtn">重新提现</el-button>
                
              </main>
              
            </div>
          
          </div>
        </main>
      </div>
    </div>
  </template>
  <script>
  import menuNav from "../components/MenuNav";
  import homeHeader from "../components/Header";
  export default {
    //   name: "guanggaoi-report",
    components: {
      menuNav,
      homeHeader,
    },
    data() {
      return {
      detailData: {}, // 订单详情数据
      juk: false, // 拒绝弹框
      causeInp: "", // 拒绝原因
    };
  },
  created() {
    this.$get("/cw/mchWithdrawBill/getById/" + this.$route.params.id).then(
      (res) => {
        console.log(res);
        this.detailData = res.data.data;
      }
    );
  },
  methods: {
    out() {
      console.log(this.$route);
      this.$router.push("/record");
    },
    // 同意提现
    consentBtn() {
    this.$router.push("/advWithdraw")
    },
    // 确定拒绝
    yes() {
      if (this.causeInp) {
        this.$post("/cw/mchWithdrawBill/updateById", {
          id: this.detailData.id,
          withdrawStatus: 2,
          auditRemark: this.causeInp,
        }).then((res) => {
          console.log(res);
          if (res.code == 200) {
            this.$message("已拒绝提现");
            this.juk = false;
            this.$router.push("/CW/finance/mch_order");
          }
        });
      } else {
        this.$message("请填写拒绝原因");
      }
    },
  },
};
  </script>
  <style scoped>
  html,
  body {
    height: 100%;
    margin: 0;
    font-size: 24px;
    color: #fff;
    font-family: "微软雅黑";
    /* line-height: 50px; */
  }
  #templateShow {
    height: calc(100vh - 60px);
    position: relative;
    /* margin-top: -30px; */
    color: #2c3e50;
    /* background-color: black; */
  }
  .el-main {
    background-color: white;
  }
  
  .active {
    background-color: rgb(64, 158, 255) !important;
    color: white !important;
  }
  
  .content-item {
    width: 260px;
    text-align: center;
    margin-right: 56px;
    
  }
  .detail {
  padding: 0 30px;
  height: 790px;
  background-color: rgb(241, 244, 246);
}
.content {
  background-color: white;
  padding: 0 40px;
  height: 100%;
}
.content h4 {
  line-height: 50px;
  color: #333;
}
.content > div {
  display: flex;
  font-size: 17px;
  line-height: 40px;
  color: #555;
  border-bottom: 1px dotted rgb(216, 213, 213);
  margin-bottom: 10px;
  padding-bottom: 10px;
}
.content > div:nth-last-of-type(1) {
  border-bottom: none;
}
.content > section {
  color: #555;
  border-bottom: 1px dotted rgb(216, 213, 213);
  margin-bottom: 20px;
  padding-bottom: 10px;
}
.content p {
  width: 300px;
}
.content > section > section {
  display: flex;
  font-size: 17px;
  line-height: 40px;
}
.btn .el-button {
  margin-top: 80px;
  width: 140px;
}
.fan {
  height: 30px;
  padding: 0;
  width: 60px !important;
 margin-top: 20px;
 margin-bottom: 10px;
}
 
  </style>